{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7126f9ea",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2021/11/09 16:44:03 Nov-Tuesday\n"
     ]
    }
   ],
   "source": [
    "import time  # 获取time板块。\n",
    "import datetime\n",
    "from datetime import datetime  # 从datetime中获取datetime板块。\n",
    "\n",
    "#  作业要求：*优化课程表，***增加用户输入***，输入指定时间格式，输出对应的课程表【OK：假设输入（Monday）可以直接输出Monday的课表】（非会员每天可以使用5次，会员可以使用10次，登录时判断）\n",
    "#  关键点：1.账号密码输入情况 √；2.会员与非会员的判断；3.会员的课表查询课表——课表情况与剩余查询次数。\n",
    "#  理清一个逻辑顺序（大包小）：1.首先确定用户是会员用户【while true】登录；2.在判断是否会员；3.再确定会员的权限【再次使用while true函数判断课表输出了多少次】；\n",
    "#  实际操作：假设自己本身就是vip会员，\n",
    "#  重点：input() ==> 输入；另外补充的知识，option ==> 选择\n",
    "\n",
    "now = datetime.now()\n",
    "print(time.strftime(\"%Y/%m/%d %H:%M:%S %b-%A\", time.localtime()))  # 以”年/月/日 时：分：秒“形式输出当地时间。\n",
    "\n",
    "vip_user = \"kismet\"\n",
    "vip_password = \"0326\"\n",
    "con_user = \"123\"\n",
    "con_password = \"456\"\n",
    "\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    # 用户输出数据\n",
    "    username = input(\"请输入您尊贵的用户名：\")\n",
    "    password = input(\"请输入您尊贵的超级密码：\")\n",
    "    # 1.先判断账号\n",
    "    if vip_user or con_user == username:\n",
    "        if vip_password == password:\n",
    "            print()\n",
    "            print(\"恭喜您：尊贵的Pycharm用户\", vip_user, \"，您已经成功登入，现在可以开始查看您独一无二的课程安排~\")\n",
    "            print(\"尊敬的vvvvvvip用户您好！您现在的课程可以通过输入数字1-5查看周一至周五的课程情况：\")\n",
    "            print()\n",
    "\n",
    "            day = datetime.today().weekday()  # 表示今天的日期\n",
    "            time = datetime.today().hour  # 表示今天日期的时间\n",
    "\n",
    "            week_day = int(day)  # ①可以将一个数转化为整数【且不带参数，直接输出int（），得到的是整数0；②int接受字符串作为参数：类型转换。】\n",
    "            week_time = int(time)\n",
    "\n",
    "            if week_day == 1:\n",
    "                if week_time < 12:\n",
    "                    print(\"不不不、不要姐你得去上课了~\")\n",
    "                elif week_time > 12 and week_time < 18:\n",
    "                    print(\"不不不、不要姐你得去上课了\")\n",
    "                    print(\"你说好巧不巧，有节课去吧哥！9-107！走起\")\n",
    "                elif week_time > 18:\n",
    "                    print(\"不不不、不要姐你又得去上课了！\")\n",
    "\n",
    "            elif week_day == 2:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有两门课啊姐，没招了姐，这个课真的不能逃啊！\")\n",
    "                    print(\"走吧走吧！8-10节 网站运营！3实-302！冲！\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"你说好巧不巧，有节课去吧哥！9-107！走起！大英可必须得去啊你可是要过四级的那！9-202\")\n",
    "                    print(\"不不不、不要姐你得去上课\")\n",
    "                if week_time > 18:\n",
    "                    print(\"终于tmd结束了匆匆忙忙的一天还得写python作业！哎～\")\n",
    "\n",
    "            elif week_day == 3:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有两门课啊姐，没招了姐，这个课真的不能逃啊！\")\n",
    "                    print(\"走吧走吧！8-10节 ！文学赏析！6-106！冲！\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"不不不、不要姐你得去上课\")\n",
    "                if week_time > 18:\n",
    "                    print(\"不不不、不要姐你得去上课\")\n",
    "                    print(\"没招了姐，这个课真的不能逃啊！大学英语9-202！\")\n",
    "\n",
    "            elif week_day == 4:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有两门课啊姐，没招了姐，这个课真的不能逃啊！\")\n",
    "                    print(\"没招了姐，这个课真的不能逃啊！Python！新综612\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"不不不、不要姐你得去上课\")\n",
    "                    print(\"没办法不能躺着！要上课了！8-11节 画画画画！1-206\")\n",
    "                if week_time > 18:\n",
    "                    print(\"终于tmd结束了匆匆忙忙的一天还得写作业！哎～\")\n",
    "\n",
    "            elif week_day == 5:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有两门课啊姐，没招了姐，这个课真的不能逃啊！\")\n",
    "                    print(\"没办法不能躺着！1-2节 ！Ai软件应用！新综612\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"没办法不能躺着！6-7节 ！体育课（体育馆）\")\n",
    "                    print(\"别拖拉！要上课了！8-9节 大学英语10-205\")\n",
    "                if week_time > 18:\n",
    "                    print(\"终于tmd结束了匆匆忙忙的一天还得写作业！哎～\")\n",
    "\n",
    "            else:\n",
    "                print(\"relax time\")\n",
    "                print(\"see you next week\")\n",
    "\n",
    "            # coding=utf-8。Unicode码位的取值范围是0x0——0x10ffff（这是十六进制数），等于十进制数0到1114111，而“Emoji”位于0x1f300——0x1f6ff区域内。\n",
    "            for i in range(0x1f600, 0x1f601):\n",
    "                print(chr(i), end=\"nice！\")\n",
    "                if i % 16 == 15:\n",
    "                    print()\n",
    "\n",
    "            while True: # 多加一个while true ，即采用该语句的核心思想是如果出现错误的话，可以继续循环。\n",
    "                # count -= 1 【这里不能紧跟着count -=1 ，因为会重复出现行106-108内容。过于繁琐】\n",
    "                print()\n",
    "                print(\"\"\"尊敬的vvvvvip会员可通过权限，查看10次详细的课表：\"\"\")\n",
    "\n",
    "                print(\"*******请输入【确切数字】，可查看当天详细课表*******\")\n",
    "                count = 10\n",
    "                while True:\n",
    "                    count -= 1  # 加在这里也没用\n",
    "                    num = [\"1\", \"2\", \"3\", \"4\", \"5\"]\n",
    "                    num = input(\"请输入您的选择:\")\n",
    "\n",
    "\n",
    "                    if \"1\" in num:\n",
    "                        print(\"星期一，有三门课\")\n",
    "                        print(\"4-5节 毛概（9-202）\")\n",
    "                        print(\"8-9节 乒乓球（球馆）\")\n",
    "                        print(\"12-14节 就业指导（9-101）\")\n",
    "                        print(\"您还有\", count, \"次查询机会\")\n",
    "                        print()\n",
    "                    elif \"2\" in num:\n",
    "                        print(\"星期二，有两门课\")\n",
    "                        print(\"4-5节 大英（2-202）\")\n",
    "                        print(\"8-10节 网站运营与管理3实-304\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会\")\n",
    "                        print()\n",
    "                    elif \"3\" in num:\n",
    "                        print(\"星期三，有一门课\")\n",
    "                        print(\"3-5节 现代国家治理（9-107）\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会\")\n",
    "                        print()\n",
    "                    elif \"4\" in num:\n",
    "                        print(\"星期四，有三门课\")\n",
    "                        print(\"1-2节 大英（9-202）\")\n",
    "                        print(\"3-5节 python（新综612）\")\n",
    "                        print(\"8-9节 文学赏析（9-101）\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会\")\n",
    "                        print()\n",
    "                    elif \"5\" in num:\n",
    "                        print(\"星期五，有三门课\")\n",
    "                        print(\"1-2节 Ai软件应用 新综612\")\n",
    "                        print(\" 3-5节 商务活动组织与策划 （9-101）\")\n",
    "                        print(\"8-9节 手绘艺术基础 （1-203）\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会\")\n",
    "                        print()\n",
    "                    if count == 0:\n",
    "                        print(\"sorry啦～您今日可查询次数已到达上限，明天见！\")\n",
    "                        break\n",
    "                break\n",
    "            break"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "390ce335",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
